home *** CD-ROM | disk | FTP | other *** search
- /* $VER: WebCacheCopy 1.0
- ©1997 by mike@kily.ruhr.de (http://kily.home.pages.de)
-
- DOPUS5.5+ Script for copy WWW-Cache files to original name
-
- description:
- The cache files from all currently available Amiga WWW-Browser
- (AWeb/Ibrowse/Voyager) have cache files with filenames like
- 0dwsmcdsnefdpmkpgh5csdo3ezeaaa or 00000011.gif or similar.
-
- But they have all the name of there origin in the file comment.
-
- This WebCacheCopy script parses during file copy from source to target dir
- the original filename from the comment and uses this as target-filename.
-
- installation:
- as Button,Menu,...
- NO Parameters, only select: <AREXX> Dopus5:ARexx/WebCacheCopy.dopus5
-
- EmailWare:
- this script is email-ware,
- please mail me your favourit Internet-Site !
-
-
- */
-
- PARSE ARG portname .
-
- IF portname='' THEN portname='DOPUS.1'
- ADDRESS VALUE portname
-
- OPTIONS RESULTS
-
- LISTER QUERY SOURCE
- Handle = RESULT
- IF RC~=0 THEN DO
- DOPUS REQUEST '"No Source-dir selected !?!" Shit'
- EXIT
- END
- LISTER QUERY Handle path
- pfad = RESULT
-
- LISTER QUERY dest
- Handle2 = RESULT
- IF RC~=0 THEN DO
- DOPUS REQUEST '"No Target-dir selected !?!" Shit'
- EXIT
- END
- LISTER QUERY Handle2 path
- target=result
-
- LISTER QUERY Handle selfiles stem files.
- IF files.count=0 THEN IF dirs.count=0 THEN EXIT
-
-
- LISTER SET handle BUSY ON
- LISTER SET handle2 BUSY ON
- lister set Handle newprogress name info bar abort
- LISTER SET Handle NEWPROGRESS title files.count 'WWW-Cache to Orig-Name Copy...'
-
-
- DO i = 0 TO files.count-1
- LISTER QUERY Handle entry files.i stem fileinfo
- LISTER SET Handle NEWPROGRESS title i+1'/'files.count' file in progress...'
-
- fileinfo.comment = Compress(fileinfo.comment,'"')
- a=lastpos('/',fileinfo.comment)
- filename = Right(fileinfo.comment,Length(fileinfo.comment)-a)
-
- LISTER SET Handle NEWPROGRESS bar files.count i+1
- LISTER SET Handle NEWPROGRESS info ''"'"filename"'"' < '"'"files.i"'"
- parse var fileinfo.comment 'http://'hostname'/'
- LISTER SET Handle NEWPROGRESS NAME 'Source: 'hostname''
-
- LISTER QUERY handle abort
- IF RESULT THEN DO
- LISTER SET handle BUSY OFF
- LISTER SET handle2 BUSY OFF
- LISTER REFRESH handle
- LISTER READ handle2 target
- EXIT
- END
-
- do while Exists(target||filename)
- filename="!"||filename
- end
-
- ADDRESS COMMAND 'COPY 'pfad||files.i' to 'target||filename''
- ADDRESS COMMAND 'Filenote >nil: 'target||filename '"'fileinfo.comment'"'
- LISTER SELECT handle '"'files.i'"' OFF
- END
-
- LISTER SET handle BUSY OFF
- LISTER SET handle2 BUSY OFF
- LISTER REFRESH handle
- LISTER READ handle2 target
-
- EXIT
-